package com.study.zk.consumer.controller;

import com.study.zk.consumer.feignClient.GoodsClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("/feign")
public class FeignGoodsController {

    @Resource
    private GoodsClient goodsClient;

    @GetMapping("/goods/")
    public List<HashMap<String, Object>> getAllGoods(){
        return goodsClient.getAllGoods();
    }

}
